import com.google.gson.Gson;

/**
 * Created by haol on 2017/4/8.
 */
public class test2 {
        public static void main(String[]args){
                Dep dep = new Dep(1,"zhangsan",0);
                Dep dep1 = new Dep(2,"zhangsan",1);
                Dep dep2= new Dep(3,"zhangsan",1);
                Dep dep3 = new Dep(4,"zhangsan",2);
                Dep dep4 = new Dep(5,"zhangsan",2);
                Dep dep5 = new Dep(6,"zhangsan",5);
               dep.getDep().add(dep1);
                dep.getDep().add(dep2);
                dep1.getDep().add(dep3);
                dep1.getDep().add(dep4);
                dep4.getDep().add(dep5);
                Gson gson = new Gson();
                String a = gson.toJson(dep);
                System.out.println(a);

        }
}
